package cn.com.dcsgo.springcloudstudy.payment.contorller;

import cn.com.dcsgo.springcloudstudy.commons.pojo.CommonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 简单演示用的controller
 *
 * @author Dcsgo
 * @since 2024/8/2 上午9:51
 */
@RestController
@Slf4j
public class SampleController {
    @Value("${server.port}")
    private String serverPort;

    @GetMapping("payment/consul")
    public CommonResult<String> getServerPort() {
        return new CommonResult<>(
                200, "success", "serverPort: " + serverPort);
    }
}
